#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
    int a = 0;
    int b = 0;
    int c = 0;
    scanf("%d", &c);
    b = c % 100;
    a = (c - b) / 100;

    if (a < 22)
        a = a + 2000;
    else if (a < 100)
        a = a + 1900;
    if (b < 10)
        printf("%d-0%d", a, b);
    else
        printf("%d-%d", a, b);

}